from supergirl.views.privatebasehandler import PrivateBaseHandler
from supergirl.forms.consultrecordforms import ConsultRecordModelForm


class ConsultRecordHandler(PrivateBaseHandler):
    display_list = ["title", "note", "consultant", "customer", "date", ]

    def get_model_form_class(self, handler_type=None, *args, **kwargs):
        return ConsultRecordModelForm

    def show_date_field(self, obj=None, is_title=False, *args, **kwargs):
        time_format = '%Y-%m-%d %H:%M:%S'
        return self.format_datetime_field(obj, "date", is_title=is_title, time_format=time_format)
